.docsearch--active {
  overflow: hidden !important;
}

.docsearch-modal-container,
.docsearch-modal-container * {
  box-sizing: border-box;
}

.docsearch-modal-container {
  background-color: var(--docsearch-modal-container-background);
  height: 100vh;
  left: 0;
  position: fixed;
  top: 0;
  width: 100vw;
  z-index: 200;
}

.docsearch-modal {
  display: flex;
  flex-direction: column;
  margin: 60px auto auto;
  background: var(--docsearch-modal-background);
  box-shadow: var(--docsearch-modal-shadow);
  max-width: var(--docsearch-modal-width);
  border-radius: 6px;
}

.docsearch-modal-search-container {
  padding: var(--docsearch-spacing) var(--docsearch-spacing) 0;
  display: flex;
}

.docsearch-modal-search-input-form {
  background: var(--docsearch-searchbox-focus-background);
  box-shadow: var(--docsearch-searchbox-shadow);
  display: flex;
  width: 100%;
  height: var(--docsearch-searchbox-height);
  padding: 0 var(--docsearch-spacing);
  margin: 0;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  position: relative;
}

.docsearch-modal-search-input {
  appearance: none;
  font: inherit;
  background: transparent;
  flex: 1;
  outline: none;
  border: none;
  font-size: 1.2em;
  height: 100%;
  color: var(--docsearch-text-color);
  padding: 0 0 0 8px;
  width: 80%;
}

.docsearch-modal-search-input-icon {
  color: var(--docsearch-primary-color);
}

.docsearch-modal-search-input-icon.docsearch-modal-search-input-loading-icon {
  animation: rotation 2s infinite linear;
}

@media (prefers-reduced-motion) {
  .docsearch-modal-search-input-icon.docsearch-modal-search-input-loading-icon {
    animation: unset;
  }
}

@keyframes rotation {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(359deg);
  }
}

.docsearch-modal-search-input-reset {
  margin: 0;
  padding: 0;
  align-items: center;
  display: flex;
  justify-content: center;
  color: var(--docsearch-icon-color);
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  height: 24px;
  width: 24px;
  border-radius: 50px;
}

.docsearch-modal-search-input-reset-icon {
  stroke-width: var(--docsearch-icon-stroke-width);
}

.docsearch-modal-search-input-reset:hover,
.docsearch-modal-search-input-reset:active,
.docsearch-modal-search-input-reset:focus {
  color: var(--docsearch-highlight-color);
}

.docsearch-modal-search-input::-webkit-search-cancel-button,
.docsearch-modal-search-input::-webkit-search-decoration,
.docsearch-modal-search-input::-webkit-search-results-button,
.docsearch-modal-search-input::-webkit-search-results-decoration {
  display: none;
}

.docsearch-modal-search-cancel-btn {
  display: none;
  background: transparent;
  outline: none;
  border: none;
  border-radius: 8px;
  color: rgb(255, 159, 159);
  font-weight: 700;
}

.docsearch-modal-search-cancel-btn:active,
.docsearch-modal-search-cancel-btn:focus {
  background: rgba(177, 177, 177, 0.2);
}

.docsearch-modal-search-hits-container {
  color: var(--docsearch-muted-color);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 var(--docsearch-spacing);
  max-height: calc(
    var(--docsearch-modal-height) - var(--docsearch-searchbox-height) -
      var(--docsearch-spacing) - var(--docsearch-footer-height)
  );
  scrollbar-color: var(--docsearch-muted-color)
    var(--docsearch-modal-background);
  scrollbar-width: thin;
}

.docsearch-modal-search-hits-container::-webkit-scrollbar {
  width: 12px;
}

.docsearch-modal-search-hits-container::-webkit-scrollbar-track {
  background: transparent;
}

.docsearch-modal-search-hits-container::-webkit-scrollbar-thumb {
  background-color: var(--docsearch-muted-color);
  border: 3px solid var(--docsearch-modal-background);
  border-radius: 20px;
}

.docsearch-modal-search-hits-container ul {
  padding: 0;
  margin: 0;
}

.docsearch-modal-search-hits-container section:last-of-type {
  margin-bottom: var(--docsearch-spacing);
}

.docsearch-modal-search-hits-category {
  background: var(--docsearch-modal-background);
  color: var(--docsearch-primary-color);
  font-weight: 600;
  font-size: 0.85em;
  line-height: 32px;
  padding: 8px 4px 0;
  margin: 0 -4px;
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  z-index: 10;
}

.docsearch-modal-search-hits-item {
  margin-bottom: 4px;
  list-style: none;
  display: flex;
  background-color: var(--docsearch-hit-background);
  height: var(--docsearch-hit-height);
  color: var(--docsearch-hit-color);
  box-shadow: var(--docsearch-hit-shadow);
  padding-top: 2px;
  border-radius: 2px;
  width: 100%;
  position: relative;
}

.docsearch-modal-search-hits-item > a {
  color: inherit;
  text-decoration: none;
  appearance: none;
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-columns: auto 24px;
  padding: 0 var(--docsearch-spacing);
}

.docsearch-modal-search-hits-item > a > * {
  min-width: 0;
  min-height: 0;
}

.docsearch-modal-search-hits-item-trailing-icon-container {
  height: 100%;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.docsearch-modal-search-hits-item--active {
  background-color: var(--docsearch-primary-color);
  color: var(--docsearch-hit-active-color);
}

.docsearch-modal-search-hits-item--highlight {
  background: none;
  color: var(--docsearch-highlight-color);
}

.docsearch-modal-search-hits-item--active
  .docsearch-modal-search-hits-item--highlight,
.docsearch-modal-search-hits-item:hover
  .docsearch-modal-search-hits-item--highlight {
  color: var(--docsearch-hit-active-color);
  text-decoration: underline;
  font-weight: bold;
}

.docsearch-modal-search-hits-item--active
  .docsearch-modal-search-hits-item-trailing-icon-container,
.docsearch-modal-search-hits-item:hover
  .docsearch-modal-search-hits-item-trailing-icon-container,
.docsearch-modal-search-hits-item:active
  .docsearch-modal-search-hits-item-trailing-icon-container,
.docsearch-modal-search-hits-item:focus
  .docsearch-modal-search-hits-item-trailing-icon-container {
  opacity: 1;
}

.docsearch-modal-search-hits-item-text-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-weight: 500;
}

.docsearch-modal-search-hits-item-title,
.docsearch-modal-search-hits-item-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0;
  margin: 0;
}

.docsearch-modal-search-hits-item-title {
  font-size: 0.9em;
}

.docsearch-modal-search-hits-item-text {
  font-size: 0.75em;
}

.docsearch-modal-empty-query {
  margin-bottom: 24px;
}

.docsearch-modal-no-search-hits,
.docsearch-modal-error {
  width: 100%;
  padding: var(--docsearch-spacing);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.docsearch-modal-no-search-hits-suggestions-list ul {
  list-style-type: "» ";
}

.docsearch-modal-title {
  margin: 0;
  margin-bottom: 10px;
  padding: 0;
  font-size: 1.1rem;
  word-break: break-all;
}

.docsearch-modal-no-search-hits-help-text {
  margin: 0;
  margin-bottom: 5px;
  padding: 0;
  font-size: 0.8rem;
}

.docsearch-modal-no-search-hits-suggestion {
  background: transparent;
  outline: none;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  color: var(--docsearch-primary-color);
}

.docsearch-modal-no-search-hits-suggestion:hover,
.docsearch-modal-no-search-hits-suggestion:active,
.docsearch-modal-no-search-hits-suggestion:focus {
  text-decoration: underline;
}

.docsearch-modal-footer {
  align-items: center;
  background: var(--docsearch-footer-background);
  border-radius: 0 0 8px 8px;
  box-shadow: var(--docsearch-footer-shadow);
  display: flex;
  flex-shrink: 0;
  height: var(--docsearch-footer-height);
  justify-content: space-between;
  padding: 0 var(--docsearch-spacing);
  position: relative;
  user-select: none;
  z-index: 300;
}

.docsearch-modal-footer-commands {
  color: var(--docsearch-muted-color);
  display: flex;
}

.docsearch-modal-footer-commands li {
  display: flex;
  align-items: center;
}

.docsearch-modal-footer-commands li {
  margin-right: 8px;
}

.docsearch-modal-footer-commands li:last-child {
  margin-right: 0px;
}

.docsearch-modal-footer-commands-key {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  border: 0px;
  padding: 3px;
  background: var(--docsearch-key-gradient);
  box-shadow: var(--docsearch-key-shadow);
  color: var(--docsearch-muted-color);
  margin-right: 4px;
}

.docsearch-modal-footer-commands-label,
.docsearch-modal-footer-logo-label {
  font-size: 0.75em;
  line-height: 1.6em;
  color: var(--docsearch-muted-color);
}

.docsearch-modal-footer-logo {
  display: flex;
  gap: 5px;
  align-items: center;
  color: var(--docsearch-muted-color);
  a {
    text-decoration: none;
    display: flex;
    align-items: center;
  }
}

.docsearch-modal-footer-logo-icon {
  margin-left: 2px;
}

@media (max-width: 768px) {
  :root {
    --docsearch-spacing: 10px;
    --docsearch-footer-height: 40px;
  }

  .docsearch-modal-container {
    height: 100vh;
    height: -webkit-fill-available;
    height: calc(var(--docsearch-vh, 1vh) * 100);
    position: absolute;
  }

  .docsearch-modal-footer {
    border-radius: 0;
    bottom: 0;
    position: absolute;
    width: 100%;
    flex-direction: row-reverse;
  }

  .docsearch-modal {
    border-radius: 0;
    box-shadow: none;
    height: 100vh;
    height: -webkit-fill-available;
    height: calc(var(--docsearch-vh, 1vh) * 100);
    margin: 0;
    max-width: 100%;
    width: 100%;
  }

  .docsearch-modal-search-cancel-btn {
    appearance: none;
    background: none;
    border: 0;
    color: var(--docsearch-highlight-color);
    cursor: pointer;
    display: inline-block;
    flex: none;
    font: inherit;
    font-size: 1em;
    font-weight: 500;
    margin-left: var(--docsearch-spacing);
    outline: none;
    overflow: hidden;
    padding: 0;
    user-select: none;
    white-space: nowrap;
  }

  .docsearch-modal-footer-commands {
    display: none;
  }

  .docsearch-modal-search-hits-container {
    max-height: calc(
      var(--docsearch-vh, 1vh) * 100 - var(--docsearch-searchbox-height) -
        var(--docsearch-spacing) - var(--docsearch-footer-height)
    );
  }
}

.docsearch-modal-footer-logo-dark {
  display: none;
}

html[data-theme="dark"] .docsearch-modal-footer-logo-dark {
  display: unset;
}

html[data-theme="dark"] .docsearch-modal-footer-logo-light {
  display: none;
}

[hidden] {
  visibility: hidden;
}
